# -*- coding: utf-8 -*-

"""
kg copy job
"""

from __future__ import unicode_literals
from __future__ import absolute_import

from kgpipeline.job import KgJob

import logging

logger = logging.getLogger(__name__)


class KgCopyJob(KgJob):
    """entity job, pass value by do nothing"""
    def __init__(self, config, reader):
        super(KgCopyJob, self).__init__(config, reader)

    def process(self, inputs):
        """
        kg copy process
        """
        logger.info("Start KgCopyJob: {} ...".format(self.name))

        if len(inputs) == 0:
            logger.warning("No input sources ... abort!")
            return []

        return [df.drop("kg_source") for df, _ in inputs]


KgJob.register("copy", KgCopyJob)
